package xyz.csmcool.imroom.feignclient;

import org.springframework.stereotype.Component;
import xyz.csmcool.imutil.dto.LastMessageDto;
import xyz.csmcool.imutil.dto.LastPrivateMessageDto;
import xyz.csmcool.imutil.utils.ResultTool;
import xyz.csmcool.imutil.webVo.ResultCode;
import xyz.csmcool.imutil.webVo.ResultVo;

import java.util.List;

/**
 * @author 什锦
 * @Package xyz.csmcool.imroom.feignclient
 * @since 2022/8/18 2:04
 */
@Component
public class ChatDegradeFeignClient implements ChatClient{
    /**
     * 获取每个房间的最后一条信息*
     *
     * @param ids
     * @return
     */
    @Override
    public ResultVo<List<LastMessageDto>> getLastMessage(List<Integer> ids) {
        return ResultTool.fail(ResultCode.CUSTOM_FAIL.setMessage("获取消息失败"));
    }

    /**
     * 获取每个用户的最后一条信息*
     *
     * @param ids
     * @param uid *
     * @return
     */
    @Override
    public ResultVo<List<LastPrivateMessageDto>> getLastPrivateMessage(List<Integer> ids, Integer uid) {
        return ResultTool.fail(ResultCode.CUSTOM_FAIL.setMessage("获取消息失败"));
    }

    /**
     * 删除聊天记录
     *
     * @param roomId
     * @return
     */
    @Override
    public ResultVo deleteRoomChats(Integer roomId) {
        return ResultTool.fail(ResultCode.CUSTOM_FAIL.setMessage("删除消息失败"));
    }
}
